/* =========================================================
   PÁGINA DE CONTACTOS
   ========================================================= */

/* ---- Hero ---- */
.contact-hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.contact-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(201, 169, 97, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.contact-hero__content {
  position: relative;
  max-width: 700px;
}

.contact-hero__kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.contact-hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  margin: 0 0 1rem;
  letter-spacing: -1px;
  line-height: 1.1;
}

.contact-hero__title em {
  color: var(--secondary);
  font-style: italic;
}

.contact-hero__text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* ---- Layout Principal ---- */
.contact-main {
  padding: 5rem 0;
  background: var(--light);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- Coluna de Informações ---- */
.contact-info__block {
  background: var(--white);
  border-radius: 16px;
  padding: 2.25rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(10, 37, 64, 0.06);
  box-shadow: 0 4px 20px rgba(10, 37, 64, 0.04);
}

.contact-info__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(10, 37, 64, 0.08);
  position: relative;
}

.contact-info__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 2px;
  background: var(--secondary);
}

/* Detalhes de contacto */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-detail {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.contact-detail__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(201, 169, 97, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-dark);
}

.contact-detail__icon svg {
  width: 22px;
  height: 22px;
}

.contact-detail__content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.35rem;
}

.contact-detail__content p,
.contact-detail__content address {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.6;
  margin: 0;
  font-style: normal;
}

.contact-detail__content a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-detail__content a:hover {
  color: var(--secondary-dark);
}

.contact-detail__content strong {
  color: var(--primary);
  font-weight: 600;
}

/* Grid de Departamentos */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.dept-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--light);
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.dept-card:hover {
  background: var(--white);
  border-color: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(10, 37, 64, 0.08);
}

.dept-card__icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-dark);
  transition: all 0.3s ease;
}

.dept-card__icon svg {
  width: 20px;
  height: 20px;
}

.dept-card:hover .dept-card__icon {
  background: var(--secondary);
  color: var(--primary);
}

.dept-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.dept-card p {
  font-size: 0.82rem;
  color: var(--gray);
  margin: 0;
}

/* Mapa Estilizado */
.contact-map {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(10, 37, 64, 0.08);
}

.contact-map__visual {
  position: relative;
  height: 280px;
  background: linear-gradient(135deg, #e8eef4 0%, #d4dfe8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(10, 37, 64, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 37, 64, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.map-pin {
  position: relative;
  z-index: 2;
  color: var(--secondary-dark);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.map-pin svg {
  width: 48px;
  height: 48px;
}

.map-label {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: var(--white);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.contact-map__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem;
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.3s ease;
}

.contact-map__link:hover {
  background: var(--primary-dark);
}

.contact-map__link svg {
  width: 16px;
  height: 16px;
}

/* ---- Coluna do Formulário ---- */
.contact-form-wrapper {
  position: sticky;
  top: 100px;
}

.contact-form-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid rgba(10, 37, 64, 0.06);
  box-shadow: 0 10px 40px rgba(10, 37, 64, 0.06);
  margin-bottom: 2rem;
}

.contact-form__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.contact-form__subtitle {
  font-size: 0.92rem;
  color: var(--gray);
  margin: 0 0 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(10, 37, 64, 0.15);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.form-group textarea {
  min-height: 120px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.5;
}

.form-checkbox input {
  margin-top: 3px;
  accent-color: var(--secondary);
}

.form-checkbox a {
  color: var(--secondary-dark);
  text-decoration: none;
}

.form-checkbox a:hover {
  text-decoration: underline;
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  margin-top: 0.5rem;
}

.form-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(10, 37, 64, 0.2);
}

.form-submit svg {
  width: 18px;
  height: 18px;
}

/* Redes Sociais */
.contact-social {
  background: var(--white);
  border-radius: 16px;
  padding: 1.75rem;
  border: 1px solid rgba(10, 37, 64, 0.06);
  text-align: center;
}

.contact-social h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 1.25rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
  border-radius: 50%;
  color: var(--primary);
  transition: all 0.3s ease;
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background: var(--secondary);
  color: var(--primary);
  transform: translateY(-3px);
}

/* ---- FAQ ---- */
.contact-faq {
  padding: 5rem 0;
  background: var(--white);
}

.faq-header {
  text-align: center;
  margin-bottom: 3rem;
}

.faq-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--primary);
  margin: 0.75rem 0 0;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--light);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(10, 37, 64, 0.06);
  transition: all 0.3s ease;
}

.faq-item[open] {
  background: var(--white);
  border-color: rgba(201, 169, 97, 0.3);
  box-shadow: 0 8px 20px rgba(10, 37, 64, 0.06);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--secondary-dark);
}

.faq-item summary svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--secondary);
}

.faq-item[open] summary svg {
  transform: rotate(180deg);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray);
}

/* =========================================================
   RESPONSIVIDADE — CONTACTOS
   ========================================================= */
@media (max-width: 992px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .contact-form-wrapper {
    position: static;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    padding: 3.5rem 0 3rem;
  }
  .contact-main {
    padding: 3.5rem 0;
  }
  .contact-info__block {
    padding: 1.75rem;
  }
  .dept-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-form-card {
    padding: 1.75rem;
  }
  .contact-faq {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .contact-detail {
    flex-direction: column;
    gap: 0.75rem;
  }
  .faq-item summary {
    font-size: 0.92rem;
    padding: 1rem 1.25rem;
  }
}


/* =========================================================
   PAGE LOADER (Ecrã de Carregamento)
   ========================================================= */

.page-loader {
    position: fixed;
    inset: 0;
    /* Fundo semitransparente */
    background: rgba(3, 35, 64, 0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Logo/imagem de carregamento */
.page-loader::before {
    content: "";
    width: 100px;
    height: 100px;
    background-image: url("../img/ucc1.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 20px;
    border-radius: 50%;
}

/* Estado quando a página termina de carregar */
.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Círculo de processamento */
.loader-spinner {
    width: 38px;
    height: 38px;

    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--secondary, #c9a961);
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
    to {
        transform: rotate(360deg);
    }
}
